﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>任务单</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <script src="components/requirejs/require.js" data-main="resources/js/taskDetail" async="async"></script>
    <link href="components/mint-ui/style.min.css" rel="stylesheet" async="async" />
    <link href="resources/css/common.css" rel="stylesheet" />
    <link href="resources/css/detail.css" rel="stylesheet" />
</head>
<body>
    <div id="view">
        <div view v-if="isloading"></div>

        <div group>
            <div group-title>
                <div center-v>
                    <img src="resources/image/backlog/release.png" />
                </div>
                <div>
                    {{detail.code}}
                </div>
                <div center>
                    <div arrow-up></div>
                </div>
            </div>
            <div group-item>
                <div>任务名称</div>
                <div>{{detail.name}}</div>
            </div>
            <div group-item>
                <div>项目名称：</div>
                <div>{{others.projectName}}</div>
            </div>
            <div group-item>
                <div>项目阶段：</div>
                <div>{{detail.projectStage}}</div>
            </div>
            <div group-item>
                <div>优先级：</div>
                <div>{{detail.priority}}</div>
            </div>
            <div group-item>
                <div>负责人：</div>
                <div>{{detail.planPrincipalName}}</div>
            </div>
            <div group-item>
                <div>计划开始时间：</div>
                <div>{{detail.planStartTime}}</div>
            </div>
            <div group-item>
                <div>计划结束时间：</div>
                <div>{{detail.planEndTime}}</div>
            </div>
            <div group-item>
                <div>计划工时：</div>
                <div>{{detail.planTimes}}</div>
            </div>
            <div group-item>
                <div>任务目标：</div>
                <div>{{detail.target}}</div>
            </div>
            <div group-item>
                <div>任务内容：</div>
                <div>{{detail.content}}</div>
            </div>
            <div group-item>
                <div>交付标准：</div>
                <div>{{detail.deliverables}}</div>
            </div>
        </div>

        <div group v-if="detail.status == '待处理'">
            <div group-title>
                <div center-v>
                    <img src="resources/image/common/incidentInfo.png" />
                </div>
                <div>
                    处理信息
                </div>
                <div center>
                    <div arrow-up></div>
                </div>
            </div>
            <div input-item>
                <div>
                    是否完成：
                </div>
                <div>
                    <input type="checkbox" v-model="detail.finished" />
                </div>
            </div>
            <div input-item>
                <div>
                    执行开始时间：
                </div>
                <datetime v-model="detail.actStartTime"></datetime>
            </div>
            <div input-item>
                <div>
                    执行结束时间：
                </div>
                <datetime v-model="detail.actEndTime"></datetime>
            </div>
            <div input-item>
                <div>
                    <span required>*</span>消耗工时：
                </div>
                <div>
                    <input type="number" v-model="detail.actTimes" />
                </div>
            </div>
            <div input-item>
                <div>
                    处理人：
                </div>
                <search title="处理人" treeurl="/common/department" listurl="/common/user?department_path=" v-model="actPrincipal"></search>
            </div>
            <div input-item textarea>
                <div>
                    <span required>*</span>处理情况：
                </div>
                <div>
                    <textarea type="text" v-model="detail.handleDesc"></textarea>
                </div>
            </div>
        </div>

        <div group v-if="detail.status == '任务确认'">
            <div group-title>
                <div center-v>
                    <img src="resources/image/common/incidentInfo.png" />
                </div>
                <div>
                    处理信息
                </div>
                <div center>
                    <div arrow-up></div>
                </div>
            </div>
            <div input-item>
                <div>
                    负责人
                </div>
                <search title="负责人" treeurl="/common/department" listurl="/common/user?department_path=" v-model="planPrincipal"></search>
            </div>
        </div>

        <div placeholder-bottombar>
        </div>
        <div bottombar>
            <input type="button" blue v-for="item in lines" v-bind:value="item.name" v-on:click="submit(item)" />
        </div>

        <mt-popup submit-popup v-model="submitVisible" pop-transition="popup-fade">
            <div input-item v-if="submitLine.processMode == 2 || (submitLine.processMode == 0 && submitLine.commitType == 1)">
                <div>下一步处理人：</div>
                <div>
                    <select v-model="nextAssigner">
                        <option v-for="item in bpm_users" v-bind:value="item.name">{{item.fullname}}</option>
                    </select>
                </div>
            </div>
            <div input-item v-if="submitLine.processMode == 0 && submitLine.commitType == 2">
                <div>下一步处理人：</div>
                <div>
                    <search title="下一步处理人" :showmodal=false treeurl="/common/department" v-bind:listurl="submituserlisturl" v-model="nextAssignerSearch"></search>
                </div>
            </div>
            <div textarea-item>
                <div>处理意见：</div>
                <div>
                    <textarea type="text" placeholder="请输入处理意见..." v-model="suggestion"></textarea>
                </div>
            </div>
            <div input-item>
                <div>常用意见：</div>
                <div>
                    <select v-model="commons" v-on:change="commonsChange($event)">
                        <option v-for="item in bpm_commons">{{item.name}}</option>
                    </select>
                </div>
            </div>
            <div submitBar center>
                <input blue type="button" value="确定" v-on:click="popupSubmit" />
                <input grey type="button" value="关闭" v-on:click="cancelSubmit" />
            </div>
        </mt-popup>
    </div>
</body>
</html>